<?php

class Application_Model_Locataire 
{
	protected $_nomCourt;
	protected $_civilite;
	protected $_nom;
	protected $_prenom;
	protected $_telephone;
	protected $_portable;
	protected $_email;
	protected $_adresse;
	protected $_cp;
	protected $_ville;
	protected $_note;
	protected $_id;

	public function __construct(array $options = null)
	{
		if (is_array($options)) {
			$this->setOptions($options);
		}
	}
	
	public function __set($name, $value)
	{
		$method = 'set' . $name;
		if (('mapper' == $name) || !method_exists($this, $method)) {
			throw new Exception('Invalid locataire property');
		}
		$this->$method($value);
	}
	
	public function __get($name)
	{
		$method = 'get' . $name;
		if (('mapper' == $name) || !method_exists($this, $method)) {
			throw new Exception('Invalid locataire property');
		}
		return $this->$method();
	}
	
	public function setOptions(array $options)
	{
		$methods = get_class_methods($this);
		foreach ($options as $key => $value) {
			$method = 'set' . ucfirst($key);
			if (in_array($method, $methods)) {
				$this->$method($value);
			}
		}
		return $this;
	}
	/**
	 * @return the $_nomCourt
	 */
	public function getNomCourt() {
		return $this->_nomCourt;
	}

	/**
	 * @return the $_civilite
	 */
	public function getCivilite() {
		return $this->_civilite;
	}

	/**
	 * @return the $_nom
	 */
	public function getNom() {
		return $this->_nom;
	}

	/**
	 * @return the $_prenom
	 */
	public function getPrenom() {
		return $this->_prenom;
	}

	/**
	 * @return the $_telephone
	 */
	public function getTelephone() {
		return $this->_telephone;
	}

	/**
	 * @return the $_portable
	 */
	public function getPortable() {
		return $this->_portable;
	}

	/**
	 * @return the $_email
	 */
	public function getEmail() {
		return $this->_email;
	}

	/**
	 * @return the $_adresse
	 */
	public function getAdresse() {
		return $this->_adresse;
	}

	/**
	 * @return the $_cp
	 */
	public function getCp() {
		return $this->_cp;
	}

	/**
	 * @return the $_ville
	 */
	public function getVille() {
		return $this->_ville;
	}

	/**
	 * @return the $_note
	 */
	public function getNote() {
		return $this->_note;
	}

	/**
	 * @return the $_id
	 */
	public function getId() {
		return $this->_id;
	}

	/**
	 * @param field_type $_nomCourt
	 */
	public function setNomCourt($_nomCourt) {
		$this->_nomCourt = $_nomCourt;
	}

	/**
	 * @param field_type $_civilite
	 */
	public function setCivilite($_civilite) {
		$this->_civilite = $_civilite;
	}

	/**
	 * @param field_type $_nom
	 */
	public function setNom($_nom) {
		$this->_nom = $_nom;
	}

	/**
	 * @param field_type $_prenom
	 */
	public function setPrenom($_prenom) {
		$this->_prenom = $_prenom;
	}

	/**
	 * @param field_type $_telephone
	 */
	public function setTelephone($_telephone) {
		$this->_telephone = $_telephone;
	}

	/**
	 * @param field_type $_portable
	 */
	public function setPortable($_portable) {
		$this->_portable = $_portable;
	}

	/**
	 * @param field_type $_email
	 */
	public function setEmail($_email) {
		$this->_email = $_email;
	}

	/**
	 * @param field_type $_adresse
	 */
	public function setAdresse($_adresse) {
		$this->_adresse = $_adresse;
	}

	/**
	 * @param field_type $_cp
	 */
	public function setCp($_cp) {
		$this->_cp = $_cp;
	}

	/**
	 * @param field_type $_ville
	 */
	public function setVille($_ville) {
		$this->_ville = $_ville;
	}

	/**
	 * @param field_type $_note
	 */
	public function setNote($_note) {
		$this->_note = $_note;
	}

	/**
	 * @param field_type $_id
	 */
	public function setId($_id) {
		$this->_id = $_id;
	}

}

?>